﻿using Abp.Application.Services.Dto;
using Mt.Site.Application.Dto;
using Mt.Site.Application.WorkFlows.Dto;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Mt.Site.Application.WorkFlows
{
    public interface IWorkFlowDesignAppService : IBackEndAppService
    {
        Task<PagedResultDto<PagedCategoryDto>> GetPagedCategoryAsync(PagedCategoryInput input);

        Task CreateCategoryAsync(CreateCategoryInput input);

        Task UpdateCategoryAsync(UpdateCategoryInput input);

        Task DeleteCategoryAsync(EntityIdListDto input);

        Task SetStatus(SetStatusInput input);

        Task SetNewOrderInfoAsync(NewSortNumberInput input);

        Task<List<FlowCategotyDto>> GetAllCategoryAsync();

        Task SwapCategorySortNumber(SwapSortNumberInput input);

        #region  workflow
        Task<PagedResultDto<PagedDesignDto>> GetPagedDesignAsync(PagedDesignInput input);

        Task<GetWorkFlowForEditOutput> GetDesignAsync(NullableIdDto<Guid> input);
        Task CreateDesignAsync(CreateDesignInput input);

        Task UpdateDesignAsync(UpdateDesignInput input);

        Task DeleteDesignAsync(EntityIdListDto input);

        Task SetDesignStatus(SetStatusInput input);

        Task SetDesignNewOrderInfoAsync(NewSortNumberInput input);

        Task<List<AllDesignInfosDto>> GetAllWorkFlows();
        Task CopyWorkFlowDefinitionAsync(EntityDto<Guid> input);

        #endregion

        #region  workFlowForm
        Task<WorkFlowFormDto> GetFlowFormAsync(EntityDto<Guid> input);
        Task CreateFlowFormAsync(CreateFlowFromInput input);

        Task UpdateFlowFormAsync(UpdateWorkForm input);

        Task DeleteFlowFormAsync(EntityIdListDto input);
        #endregion

        #region  workFlowNode

        Task<List<PagedFlowNodeDto>> GetPagedFlowNodeAsync(PagedFlowNodeInput input);

        Task<GetFLowNodeForEditOutput> GetFlowNodeAsync(GetFlowNodeInput input);
        Task CreateFlowNodeAsync(CreateFlowNodeInput input);

        Task UpdateFlowNodeAsync(UpdateFlowNodeInput input);

        Task DeleteFlowNodeAsync(EntityIdListDto input);

        Task SetFlowNodeStatus(SetStatusInput input);

        /// 拖拽排序
        Task SwapFlowNodeSortAsync(SwapSortNumberInput input);
        #endregion

        Task<CreateOrUpdateListCtrlDto> GetListCtrlConfigAsync(EntityDto<Guid> input);

        Task CreateOrUpdateListCtrlAsync(CreateOrUpdateListCtrlDto input);

        Task<PagedResultDto<PagedListCtrlDto>> GetPagedListCtrlAsync(PagedSortedAndFilteredInputDto input);

        Task<WorkFlowSelectUnitsDto> GetFilterUnitsAsync(FilterUnitInput input);
    }
}
